<extend name="_layout/main" />
<block name="content">


    <div id="mws-container" class="clearfix">
        <div class="container">



            <div class="mws-panel grid_8">
                <div class="mws-panel-header">
                    <span class="mws-i-24 i-list">权限分类添加</span>
                </div>
                <div class="mws-panel-body">
                    <form class="mws-form" action="{:U('')}" method="post">
                        <input type="hidden" value="{$row['id']}"/>
                        <div class="mws-form-inline">
                            <div class="mws-form-row">
                                <label>分类名称</label>
                                <div class="mws-form-item small">
                                    <input name="cname" type="text" class="mws-textinput" value="{$row.rolename}"/>
                                </div>
                            </div>
                            <div class="mws-form-row">
                                <label>上级分类</label>
                                <div class="mws-form-item small">
                                    <select name="parentid">
                                        <option value="0">顶级分类</option>
                                        <volist name="datas" id="data">

                <option value="{$data['id']}" <if condition="$row['parentid'] eq $data['id']">selected = "selected" </if><?php
        if($data['id'] == $row['id'])
                			continue;
          ?>> {:str_repeat('-',$data['level']*5)}{$data.rolename}</option>

                                        </volist>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="mws-button-row">
                            <input type="submit" value="Submit" class="mws-button green" />
                        </div>
                    </form>
                </div>
            </div>
        </div>

        <div id="mws-footer">
            Copyright &copy; 2014.Company name All rights reserved.<a target="_blank" href="http://www.17sucai.com/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a>
        </div>

    </div>

</block>